<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>${pageTitle }-Powered by LiddHome</title>

<link rel="stylesheet" href="${pageContext.request.contextPath}/static/bootstrap3/css/bootstrap.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/bootstrap3/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/blog.css">
<link href="${pageContext.request.contextPath}/favicon.png" rel="SHORTCUT ICON">
<script src="${pageContext.request.contextPath}/static/bootstrap3/js/jquery-1.11.2.min.js"></script>
<script src="${pageContext.request.contextPath}/static/bootstrap3/js/bootstrap.min.js"></script>

<script>
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "//hm.baidu.com/hm.js?aa5c701f4f646931bf78b6f40b234ef5";
	  var s = document.getElementsByTagName("script")[0]; 
	  s.parentNode.insertBefore(hm, s);
	})();
	
	$(function(){
		adshow();
		wechat();
		imghoverchange();
		essayhoverchange();
	});
	
	function adshow(){
		if ('${pageContext.request.contextPath}/index/new.html' === location.pathname || '${pageContext.request.contextPath}/index/hot.html' === location.pathname) {
            $("#adandblackboard").show();
        } else {
            $("#adandblackboard").hide();
        }
	}
	
	function wechat(){
		$(".wechat").hover(function(){
			$(".qrwechat").fadeIn();
		},function(){
			$(".qrwechat").fadeOut();
		});
	}
	
	function imghoverchange(){
		$(".followme").find("a").each(function(){
			var img = $(this).find("img:first")[0];
			var _src = $(img).attr("src");
			$(this).hover(function(){
				var src = $(img).attr("src").replace("_","");
				$(img).attr("src",src);
			},function(){
				$(img).attr("src",_src);
			});
		}); 
	}
	
	function essayhoverchange(){
		$(".essay_list").find("li").each(function(){
			var content = $(this).find(".content");
			var date = $(this).find(".date");
			var arrow = $(this).find('.arrow');
			$(content).hover(function(){
				$(date).css("background-color","#ddd");
				$(content).css("background-color","#ddd");
				$(arrow).css("border-left","15px solid #aaa");
				$(this).css("cursor","pointer");
			},function(){
				$(date).css("background-color","#eee");
				$(content).css("background-color","#eee");
				$(arrow).css("border-left","15px solid #ccc");
			});
		});
	}
</script>

<style type="text/css">
	  body {
        padding-top: 10px;
        padding-bottom: 40px;
        background-color: #efefef;
      }
</style>
</head>
<body>
<div class="container">
	<jsp:include page="/foreground/common/head.jsp"/>
	
	<jsp:include page="/foreground/common/menu.jsp"/>
	
	<div class="row" id="adandblackboard">
		<div class="col-md-7">
			<jsp:include page="/foreground/ad/carousel.jsp"/>
		</div>
		
		<div class="col-md-5">
			<jsp:include page="/foreground/ad/blackboard.jsp"/>
		</div>
	</div>
	
	<div class="row" style="margin-top: 20px;">
		
		<div class="col-md-9">
			<jsp:include page="${mainPage }"></jsp:include>
		</div>
		
		<div class="col-md-3">
			<div class="data_list">
				<div class="data_list_title">
					<img src="${pageContext.request.contextPath}/static/images/user_icon.png"/>
					博主信息
				</div>
				<div class="user_image">
					<img src="/userImages/headphoto/${blogger.imageName }"/>
				</div>
				<div class="nickName">${blogger.nickName }</div>
				<div class="userSign"><p>${blogger.sign } </p></div>
				<!-- 公众号二维码漂浮图片 -->
				<div class="qrwechat">
					<img alt="" src="${pageContext.request.contextPath}/static/images/qrwechat.jpg">
				</div>
				
				<div class="data_list_title">
					<img src="${pageContext.request.contextPath}/static/images/heart.png"/>
					关注我
				</div>
				<div class="followme">
					<a href="https://weibo.com/p/1005055031665124/home?from=page_100505&mod=TAB#place" target="_blank"><img alt="sina" title="新浪微博" src="${pageContext.request.contextPath}/static/images/_sina.png"></a>
					<a class="wechat" href=""><img alt="wechat" title="微信公众号" src="${pageContext.request.contextPath}/static/images/_wechat.png"></a>
					<a href="mailto:liddhome@163.com"><img alt="mail" title="邮箱" src="${pageContext.request.contextPath}/static/images/_mail.png"></a>
				</div>
				<div class="followme">
					<a href="https://my.oschina.net/liddhome" target="_blank"><img alt="osc" title="开源中国博客" src="${pageContext.request.contextPath}/static/images/_osc.png"></a>
					<a href="https://gitee.com/liddhome" target="_blank"><img alt="mayun" title="码云" src="${pageContext.request.contextPath}/static/images/_mayun.png"></a>
					<a href="https://www.toutiao.com/c/user/5440359500/" target="_blank"><img alt="toutiao" title="今日头条" src="${pageContext.request.contextPath}/static/images/_toutiao.png"></a>
				</div>
			</div>
			
			<div class="data_list">
				<div class="data_list_title">
					<img src="${pageContext.request.contextPath}/static/images/byType_icon.png"/>
					按日志类别
				</div>
				<div class="datas">
					<ul>
						<c:forEach var="blogTypeCount" items="${blogTypeCountList }">
							<li><span><a href="${pageContext.request.contextPath}/index/new.html?typeId=${blogTypeCount.id }">${blogTypeCount.typeName }(${blogTypeCount.blogCount })</a></span></li>
						</c:forEach>
					</ul>
				</div>
			</div>
			
			<div class="data_list">
				<div class="data_list_title">
					<img src="${pageContext.request.contextPath}/static/images/byDate_icon.png"/>
					按日志日期
				</div>
				<div class="datas">
					<ul>
						<c:forEach var="blogCount" items="${blogCountList }">
							<li><span><a href="${pageContext.request.contextPath}/index/new.html?releaseDateStr=${blogCount.releaseDateStr }">${blogCount.releaseDateStr }(${blogCount.blogCount })</a></span></li>
						</c:forEach>
					</ul>
				</div>
			</div>
			
			<div class="data_list">
				<div class="data_list_title">
					<img src="${pageContext.request.contextPath}/static/images/link_icon.png"/>
					友情链接
				</div>
				<div class="datas">
					<ul>
						<c:forEach var="link" items="${linkList }">
							<li><span><a href="${link.linkUrl }" target="_blank">${link.linkName }</a></span></li>
						</c:forEach>
					</ul>
				</div>
			</div>
			
			<div class="data_list">
				<div class="data_list_title">
					<img src="${pageContext.request.contextPath}/static/images/dollars.png"/>
					慷慨解囊
				</div>
				<div class="supportme">
					<img alt="微信" title="微信扫一扫赞助" src="${pageContext.request.contextPath}/static/images/weixin.png" style="margin-left: 18px;width: 200px;height: 200px;">
					<span style="margin-left: 73px;">微信扫一扫赞助</span>
					<img alt="支付宝" title="支付宝扫一扫赞助" src="${pageContext.request.contextPath}/static/images/zhifubao.png" style="margin-left: 18px;width: 200px;height: 200px;">
					<span style="margin-left: 70px;">支付宝扫一扫赞助</span>
				</div>
			</div>
			
		</div>
		
		
	</div>
	
	<jsp:include page="/foreground/common/foot.jsp"/>
</div>
</body>
</html>